<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<tr><td><table width="100%" border="0" cellpadding="8" cellspacing="1">


    <tbody><tr>
        <td width="25%" bgcolor="#F5F5F5" align="center">所用字符</td>
        <td width="75%" bgcolor="#FFFFFF">
            <input id="ss_dx" type="checkbox" checked="checked">A-Z　
            <input id="ss_xx" type="checkbox" checked="checked">a-z　
            <input id="ss_sz" type="checkbox" checked="checked">0-9　
            <input id="ss_fh" type="checkbox" onclick="ss_fh();">
            <input id="ss_fh_value" type="text" value="! @ # $ % ^ &amp; *" size="2" disabled="">
        </td>
    </tr>

    <tr>
        <td bgcolor="#F5F5F5" align="center">密码长度</td>
        <td bgcolor="#FFFFFF"><input id="ss_cd" type="text" value="16" > 位</td>
    </tr>

    <tr>
        <td bgcolor="#F5F5F5" align="center">生成结果</td>
        <td bgcolor="#FFFFFF" id="ss_jieguo"><input type="text"  value="" readonly="readonly">　
    </tr>


    </tbody></table></td></tr>

<div align="center">
    <br><input id="ss_anniu" type="button" onclick="ss_jc_jc();" value="生成密码">
</div>


<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
    function ss_fh(){
        //console.log($("#ss_fh").is(':checked'));
        if($("#ss_fh").is(':checked')){
            $("#ss_fh_value").removeAttr("disabled");
        }else{
            $("#ss_fh_value").attr("disabled","disabled");
        }
    }


    function ss_jc_jc() {
        var datas = {
            'ss_dx':$("#ss_dx").is(':checked'),
            'ss_xx':$("#ss_xx").is(':checked'),
            'ss_sz':$("#ss_sz").is(':checked'),
            'ss_fh':$("#ss_fh").is(':checked'),
            'ss_cd':$("#ss_cd").val(),

            'ss_fh_value':$("#ss_fh_value").val()
        }
        $.post("./pwd.php",datas,function(data){
        console.log(data);
            $("#ss_jieguo").html(data);
        },'json')

    }
</script>

</body>
</html>

